<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <title>HistoryApplicationDisplay</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="../IMG/favicon.ico">
    <link href="../node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="../node_modules/normalize.css/normalize.css" />
    <script src="../node_modules/jquery/dist/jquery.min.js"></script>
    <script src="../node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../node_modules/font-awesome/css/font-awesome.min.css">
  </head>
    <body>
        <!--悬浮按钮-->
        <div class="dangling-box">
            <a id="danglingBack" style="display: none;"><i class="dangling-icon fa fa-arrow-up" aria-hidden="true"></i></a>
        </div>
        <!-- 主体 -->
        <div class="main">
            <div class="page-header">
                <h2 class="page-title">历史申请展示</h2>
            </div>
            <!-- 申请类别选择 -->
            <div class="tab-box">
                <a class="a-tab a-tab-active" id="RepairTab" onclick="changeTab(this, 'Repair');">报修</a>
                <a class="a-tab" id="ScrapTab" onclick="changeTab(this, 'Scrap');">报废</a>
                <a class="a-tab" id="PurchaseTab" onclick="changeTab(this, 'Purchase');">采购入库</a>
            </div>
            <!-- 申请表格展示 -->
            <div class="table-box table-responsive">
                <table class="table table-hover" id="commonTable">
                    <thead>
                        <tr>
                            <th>申请编号</th>
                            <th>申请状态</th>
                            <th>申请人</th>
                            <th>申请时间</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody id="commonTbody"></tbody>
                </table>
                <table class="table table-hover" id="purchaseTable" style="display: none;">
                    <thead>
                        <tr>
                            <th>序号</th>
                            <th>夹具代码</th>
                            <th>夹具序列号</th>
                            <th>申请状态</th>
                            <th>申请人</th>
                            <th>申请时间</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody id="purchaseTbody"></tbody>
                </table>
            </div>
            <!-- 分页框 -->
            <div class="setPageDiv">
                <ul class="pagination" id="paginationApplication"></ul>
            </div>
        </div>

        <!-- 查看普通申请单详情 -->
        <div class="modal fade" id="applicationInfoModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="modalTitle">申请单详情</h4>
                    </div>
                    <div class="modal-body" id="modal_body">
                        <div class="InfoModal-main form-horizontal">
                            <div class="form-group">
                                <label class="control-label col-sm-3" for="OrderID">申请编号</label>
                                <p class="attr" id="OrderID"></p>                                
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-3" for="ToolList">夹具列表</label>
                                <div class="col-sm-8">
                                    <textarea class="form-control" rows="6" id="ToolList" disabled></textarea>
                                </div>
                            </div>
                            <!-- 展示类型根据申请类型变化 -->
                            <div class="variable-box">
                                <!-- 报修 -->
                                <div id="repairBox" style="display: none;">
                                    <div class="form-group">
                                        <label class="control-label col-sm-3" for="PMContent">故障类别</label>
                                        <p class="attr" id="PMContent"></p>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-sm-3" for="RepairReason">故障描述</label>
                                        <p class="attr" id="RepairReason"></p>
                                    </div>
                                </div>
                                <!-- 报废 -->
                                <div id="scrapBox" style="display: none;">
                                    <div class="form-group">
                                        <label class="control-label col-sm-3" for="ScrapReason">报废原因</label>
                                        <p class="attr" id="ScrapReason"></p>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-3" for="State">申请类型</label>
                                <p class="attr" id="State"></p> 
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-3" for="Applicant">申请人</label>
                                <p class="attr" id="Applicant"></p> 
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-3" for="ApplicationTime">申请人时间</label>
                                <p class="attr" id="ApplicationTime"></p> 
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-3" for="Reviewer">终审人</label>
                                <p class="attr" id="Reviewer"></p> 
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 查看采购入库申请单详情 -->
        <div class="modal fade" id="purchaseInfoModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="modalTitle">申请单详情</h4>
                    </div>
                    <div class="modal-body" id="modal_body">
                        <div class="InfoModal-main form-horizontal">
                            <div class="form-group">
                                <label class="control-label col-sm-3" for="Code">夹具代码</label>
                                <p class="attr" id="Code"></p>                                
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-3" for="SeqID">夹具序列号</label>
                                <p class="attr" id="SeqID"></p>                                
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-3" for="Buyoff">夹具buyoff编号</label>
                                <p class="attr" id="Buyoff"></p>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-3" for="BillNo">采购单据号</label>
                                <p class="attr" id="BillNo"></p>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-3" for="StoreHouse">存放库位</label>
                                <p class="attr" id="StoreHouse"></p>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-3" for="purchaseState">申请状态</label>
                                <p class="attr" id="purchaseState"></p> 
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-3" for="purchaseApplicant">申请人</label>
                                <p class="attr" id="purchaseApplicant"></p> 
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-3" for="purchaseApplicationTime">申请人时间</label>
                                <p class="attr" id="purchaseApplicationTime"></p> 
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-3" for="purchaseReviewer">终审人</label>
                                <p class="attr" id="purchaseReviewer"></p> 
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <link href="../CSS/ApplicationReview.css" rel="stylesheet" type="text/css">
        <script src="../node_modules/jqPaginator-2.0.2/dist/jq-paginator.js"></script>
        <script src="../JS/HistoryApplicationDisplay.js"></script>
    </body>
</html>
